<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../css/aui.css" />
      <link rel="stylesheet" type="text/css" href="../css/style.css" />
      <style>
              .aui-bar-nav {
                  background: none;
              }
              body {
                background:#F2F2F2;

              }
              .aui-bar-nav .aui-iconfont {
                  font-weight: bold;
              }
              #header{
                padding-top: 10%;
                background: #fff;
                color: #000;
              }
              #header a span{
                color: #000;
              }
              .top{
                width: 340px;
                background:rgba(255,255,255,1);
                border-radius:5px;
                margin: 0 auto;
                margin-top: 10px;
                padding-top: 15px;
                padding-bottom: 5px;
              }
              .top_a{
                display: flex;
                font-family:PingFang SC;
                font-weight:500;
                color: #333333;
                padding: 0 5px;
              }
              .top_b{
                display: flex;
                font-family:PingFang SC;
                font-weight:500;
                color: #666666;
                padding: 0 5px;
                margin-top: 12px;
              }
              .top_a>div{
                width: 65px;
                font-size: 15px;
                text-align: center;
              }
              .top_b>div{
                width: 65px;
                font-size: 12px;
                text-align: center;
              }
              .top_x{
                height:1px;
                border:1px solid rgba(242,242,242,1);
                margin-top: 5px;
              }
      </style>
  </head>
  <body>
      <div id="app">
        <header id="header" class="aui-bar aui-bar-nav">
            <a class="aui-pull-left aui-btn" tapmode onclick="comeBack()">
                <span class="aui-iconfont aui-icon-left"></span>
            </a>
            <div class="aui-title">好友详情</div>
        </header>

        <div id="app" class="top">
              <div class="top_a">
                <div>下级</div>
                <div>人数</div>
                <div>订单数</div>
                <div>总收益</div>
                <div>今日收益</div>
              </div>

              <div v-for="(item,index) in lists" :key="index">
                <div class="top_x"></div>
                <div class="top_b">
                  <div>{{item.title}}</div>
                  <div>{{item.teamnum}}</div>
                  <div>{{item.ordernum}}</div>
                  <div>{{item.cointotal}}</div>
                  <div>{{item.cointoday}}</div>
                </div>
              </div>

              <!-- <div>
                <div class="top_x"></div>
                <div class="top_b">
                  <div>张三</div>
                  <div>1</div>
                  <div>1</div>
                  <div>10.02</div>
                  <div>10.02</div>
                </div>
              </div>

              <div>
                <div class="top_x"></div>
                <div class="top_b">
                  <div>张三</div>
                  <div>1</div>
                  <div>1</div>
                  <div>10.02</div>
                  <div>10.02</div>
                </div>
              </div> -->
        </div>
      </div>
  </body>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/common.js"></script>
  <script type="text/javascript" src="../script/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="../script/md5.min.js"></script>
  <script type="text/javascript" src="../script/vue.js"></script>
  <script type="text/javascript">
      apiready = function(){
            var h=api.winHeight;
            $api.css($api.dom('body'),'height:'+h+'px;');
            vm = new Vue({
                el: "#app",
                data:{
                  lists:''
                },
                methods:{
                }
            })
             list();
             api.setRefreshHeaderInfo({
              loadingImg: 'widget://image/refresh.png',
              bgColor: '#728EFF',
              textColor: '#fff',
              textDown: '下拉刷新...',
              textUp: '松开刷新...'
          }, function(ret, err) {
              //在这里从服务器加载数据，加载完成后调用api.refreshHeaderLoadDone()方法恢复组件到默认状态
              list();
              api.refreshHeaderLoadDone();
          });
            function list() {
              let that=this;
              _ajax("user/getteamperformance", {}, function(res, err) {
                  console.log(JSON.stringify(res))
                  if (res) {
                    var data=JSON.stringify(res);
                    console.log(data);
                    _msg(res.msg)
                    vm.lists=res.data
                  } else {
                      _msg("网络错误");
                  }
              })
            }
        };
      // };
  </script>
  </html>
